<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>UCARPP: includes/bmp-tools.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">UCARPP
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('bmp-tools_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">includes/bmp-tools.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="bmp-tools_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00010"></a>00010 <span class="preprocessor">#ifndef BMPTOOLS_H_</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define BMPTOOLS_H_</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;math.h&gt;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;stdbool.h&gt;</span>
<a name="l00017"></a>00017 
<a name="l00021"></a><a class="code" href="structRGB.html">00021</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> {
<a name="l00023"></a><a class="code" href="structRGB.html#a8ea970fcd312802ef238733b1c9ed63d">00023</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structRGB.html#a8ea970fcd312802ef238733b1c9ed63d">r</a>;
<a name="l00025"></a><a class="code" href="structRGB.html#a3595e9a2ed44c815153aff4e84e2d97c">00025</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structRGB.html#a3595e9a2ed44c815153aff4e84e2d97c">g</a>;
<a name="l00027"></a><a class="code" href="structRGB.html#ab2a3ac761d61594e2c51d65347a74017">00027</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structRGB.html#ab2a3ac761d61594e2c51d65347a74017">b</a>;
<a name="l00028"></a>00028 } <a class="code" href="bmp-tools_8h.html#ab4883aa27e608dfa6053e326759e58ee" title="gestisce in modo semplice una bitmap">RGB</a>;
<a name="l00029"></a>00029 
<a name="l00030"></a><a class="code" href="bmp-tools_8h.html#ad86358bf19927183dd7b4ae215a29731">00030</a> <span class="preprocessor">#define COLOR_RED                       (RGB){255,0,0}</span>
<a name="l00031"></a><a class="code" href="bmp-tools_8h.html#a68b9570c39bd1e193fe65b734cc47cb2">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_DARK_RED          (RGB){100,0,0}</span>
<a name="l00032"></a><a class="code" href="bmp-tools_8h.html#aef75f616b9a3fdb10d38395dfb996873">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_ORANGE            (RGB){175,95,0}</span>
<a name="l00033"></a><a class="code" href="bmp-tools_8h.html#af1efa5dc76aa7ffe86b49e29721d76eb">00033</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_DARK_ORANGE       (RGB){125,40,0}</span>
<a name="l00034"></a><a class="code" href="bmp-tools_8h.html#a4534b577b74a58b0f4b7be027af664e0">00034</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_YELLOW            (RGB){175,175,0}</span>
<a name="l00035"></a><a class="code" href="bmp-tools_8h.html#aa705a7627553e492368081ee16f1ae68">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_DARK_YELLOW       (RGB){75,75,0}</span>
<a name="l00036"></a><a class="code" href="bmp-tools_8h.html#afc9149f5de51bd9ac4f5ebbfa153f018">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_GREEN                     (RGB){0,255,0}</span>
<a name="l00037"></a><a class="code" href="bmp-tools_8h.html#aaaaec42f9e5d8b8240243192d9ee43ec">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_DARK_GREEN        (RGB){0,100,0}</span>
<a name="l00038"></a><a class="code" href="bmp-tools_8h.html#a7d60e4dfa049d9ba46d0670fa2f21053">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_CIAN                      (RGB){0,175,175}</span>
<a name="l00039"></a><a class="code" href="bmp-tools_8h.html#a9d51963b003fa68e46b22fac5ea28cfe">00039</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_DARK_CIAN         (RGB){0,75,75}</span>
<a name="l00040"></a><a class="code" href="bmp-tools_8h.html#a23c70d699a5a775bc2e1ebeb8603f630">00040</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_BLUE                      (RGB){0,0,255}</span>
<a name="l00041"></a><a class="code" href="bmp-tools_8h.html#a13d2340de395ffd615ad44cf397377d7">00041</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_DARK_BLUE         (RGB){0,0,100}</span>
<a name="l00042"></a><a class="code" href="bmp-tools_8h.html#a074ac45312467d6ea439637095c01925">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_VIOLET            (RGB){175,0,175}</span>
<a name="l00043"></a><a class="code" href="bmp-tools_8h.html#a4e819fbec55f5a4bde446fef72dd5032">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_DARK_VIOLET       (RGB){75,0,75}</span>
<a name="l00044"></a><a class="code" href="bmp-tools_8h.html#a502b77f3a488ac4b6331e37d0ee3a80e">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_GREY                      (RGB){175,175,175}</span>
<a name="l00045"></a><a class="code" href="bmp-tools_8h.html#a48b5aa8090b47348dddba1c4d01eb0df">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_DARK_GREY         (RGB){75,75,75}</span>
<a name="l00046"></a><a class="code" href="bmp-tools_8h.html#aba2a7fe77a7501e5844370eec0185207">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_BLACK                     (RGB){0,0,0}</span>
<a name="l00047"></a><a class="code" href="bmp-tools_8h.html#a9b44987ffdc2af19b635206b94334b69">00047</a> <span class="preprocessor"></span><span class="preprocessor">#define COLOR_WHITE                     (RGB){255,255,255}</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a>00049 
<a name="l00056"></a><a class="code" href="structImage.html">00056</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structImage.html">Image</a>{
<a name="l00058"></a><a class="code" href="structImage.html#ab8d12f635013c04159cd4d3d972bac88">00058</a>         <span class="keywordtype">int</span> <a class="code" href="structImage.html#ab8d12f635013c04159cd4d3d972bac88">width</a>;
<a name="l00060"></a><a class="code" href="structImage.html#a51df43db420c9c0b57536cb2dd36de5c">00060</a>         <span class="keywordtype">int</span> <a class="code" href="structImage.html#a51df43db420c9c0b57536cb2dd36de5c">height</a>;
<a name="l00062"></a><a class="code" href="structImage.html#ac4c61094a5b66d8cc47f874f17996bee">00062</a>         <a class="code" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a>** <a class="code" href="structImage.html#ac4c61094a5b66d8cc47f874f17996bee">map</a>;
<a name="l00063"></a>00063 } <a class="code" href="bmp-tools_8h.html#a9082e6aa9fd1705dc218cf44bc5a9d66">Image</a>;
<a name="l00064"></a>00064 
<a name="l00067"></a><a class="code" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">00067</a> <span class="keyword">typedef</span> <a class="code" href="structImage.html">Image</a>* <a class="code" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a>;
<a name="l00071"></a><a class="code" href="bmp-tools_8h.html#adb742af21055c1163a47a04d79eaf2f1">00071</a> <span class="keyword">typedef</span> <a class="code" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a>* <a class="code" href="bmp-tools_8h.html#adb742af21055c1163a47a04d79eaf2f1">PRGB</a>;
<a name="l00072"></a>00072 
<a name="l00083"></a>00083 <a class="code" href="structImage.html">Pimage</a> <a class="code" href="bmp-tools_8h.html#a2304a52dedbf0d6c2fa867cbe99456fe">initImage</a>(<span class="keywordtype">int</span> w,<span class="keywordtype">int</span> h);
<a name="l00084"></a>00084 
<a name="l00089"></a>00089 <span class="keywordtype">void</span> <a class="code" href="bmp-tools_8h.html#ac6ef3db94845a339fd033fd8721fa09c">freeImage</a>(<a class="code" href="structImage.html">Pimage</a> img);
<a name="l00090"></a>00090 
<a name="l00099"></a>00099 <a class="code" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> <a class="code" href="bmp-tools_8h.html#a24e5c53a2745051f29c087b7a7746a44">getRGB</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> r,<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> g,<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> b);
<a name="l00100"></a>00100 <span class="comment">//TODO documentazione</span>
<a name="l00101"></a>00101 <span class="keywordtype">void</span> <a class="code" href="bmp-tools_8h.html#a028c544411b16dc981510a486955dbe1">printRGB</a>(FILE* f,<a class="code" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> rgb);
<a name="l00102"></a>00102 
<a name="l00103"></a>00103 <span class="comment">//TODO documentazione</span>
<a name="l00104"></a>00104 <span class="keywordtype">bool</span> <a class="code" href="bmp-tools_8h.html#a6e5a0ee5f0004be05a94a16764043f2c">equalsRGB</a>(<a class="code" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> color1,<a class="code" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> color2);
<a name="l00105"></a>00105 
<a name="l00120"></a>00120 <span class="keywordtype">void</span> <a class="code" href="bmp-tools_8h.html#a75a28516aa9aab1107d55859b93a4fd5">setPixelInImage</a>(<a class="code" href="structImage.html">Pimage</a> img,<span class="keywordtype">int</span> x,<span class="keywordtype">int</span> y,<a class="code" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> rgb);
<a name="l00121"></a>00121 <span class="comment">//TODO documentazione</span>
<a name="l00122"></a>00122 <span class="keywordtype">void</span> <a class="code" href="bmp-tools_8h.html#a52335e173e1290a42a2074760f41b275">updatePixelInImage</a>(<a class="code" href="structImage.html">Pimage</a> img,<span class="keywordtype">int</span> x,<span class="keywordtype">int</span> y,<a class="code" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> rgb);
<a name="l00123"></a>00123 
<a name="l00140"></a>00140 <span class="keywordtype">void</span> <a class="code" href="bmp-tools_8h.html#a584227fbe4068c495925aa43da75154e">writeHeaderInFile</a>(FILE* f,<span class="keywordtype">int</span> M,<span class="keywordtype">int</span> N);
<a name="l00141"></a>00141 
<a name="l00154"></a>00154 <span class="keywordtype">void</span> <a class="code" href="bmp-tools_8h.html#a88649c6c08383d9fb6adb1e1b9ff61f4">applyImageToFile</a>(<a class="code" href="structImage.html">Pimage</a> img, FILE* bmpfile);
<a name="l00155"></a>00155 
<a name="l00167"></a>00167 <span class="keywordtype">void</span> <a class="code" href="bmp-tools_8h.html#a879b08ba3760bae6c7339b6cbb1a800d">fillColor</a>(<a class="code" href="structImage.html">Pimage</a> img,<a class="code" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> color);
<a name="l00168"></a>00168 
<a name="l00189"></a>00189 <span class="keywordtype">void</span> <a class="code" href="bmp-tools_8h.html#ac8f09d87c60b7d9b2dd3786b4d50fb16">drawLine</a>(<a class="code" href="structImage.html">Pimage</a> img,<span class="keywordtype">int</span> fromx,<span class="keywordtype">int</span> fromy, <span class="keywordtype">int</span> tox, <span class="keywordtype">int</span> toy, <span class="keywordtype">int</span> radius, <a class="code" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> color);
<a name="l00190"></a>00190 
<a name="l00191"></a>00191 
<a name="l00192"></a>00192 <span class="preprocessor">#endif </span><span class="comment">/* BMPTOOLS_H_ */</span>
</pre></div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="bmp-tools_8h.html">bmp-tools.h</a>      </li>

    <li class="footer">Generated on Thu Jun 27 2013 11:34:36 for UCARPP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
